import { t } from 'i18next'
/** 请求日志列表接口返回值 */
export type FetchNoticeParam = { list?: FetchNotice[]; total?: number }
export interface FetchNotice {
	/** moid */
	moid: string
	/** 消息内容 */
	title: string
	context: {
		/** 消息人 */
		subject: string
		/** 会议moid */
		meetingMoid: string
	}
	source: string
	type: NotifyType
	created_at: string
	updated_at: string
	alert_state: 0 | 1
	/** 是否已读 */
	read_state: 0 | 1
}
export type NotifyType = keyof typeof notifyTypeMap
export const notifyTypeMap = {
	NORMAL_START_FAIL_CAUSE_OF_LACK_OF_RES: { desc: t('虚拟会议室资源不足，召开失败') },
	NORMAL_START_FAIL_CAUSE_OF_NACK_FROM_CSS: { desc: t('当前没有空闲的会议资源召开失败') },
}
export interface INotice {
	moid: string
	subject: string
	desc: string
	keyUrl: string
	read_state: 0 | 1
}
